package jdbc_test.datasource;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;

public class C3P0_Test {
    public static void main(String[] args) throws SQLException {
        C3P0_Test c3P0_test = new C3P0_Test();
        c3P0_test.testC3P0_02();

    }

//    C3P0第二种连接方式

    public void testC3P0_02() throws SQLException {

//        1.创建一个数据源对象
        ComboPooledDataSource comboPooledDataSource = new ComboPooledDataSource("LZT");

        Connection connection = comboPooledDataSource.getConnection();

        System.out.println("连接ok");
        connection.close();


    }
}
